#pragma once

#include "bsp_tool.hpp"

class ph1p35_tool: public bsp_tool
{
public:
    // Function Tools
    std::string get_cpu_name(std::string proc);

    std::map<std::string, std::string> new_makefile_replaced();
    void process_platform_file(std::string platform_dir, std::string hpf);
    void process_bsp_makefile(std::string bsp_loc);
    void process_app_makefile(std::string bsp_loc, std::string app_loc, std::string app_name);

    std::vector<std::string> get_include_paths(std::string bsp_loc);

    std::vector<std::string> get_link_scripts(std::string app_loc, std::string chip, std::string download);
    
    // HPF Parser
    std::map<std::string, std::string> get_drivers_from_hpf(std::string hpf, int type);

    // BSP Tools
    void create_mss_from_hpf(std::string hpf, std::string mssfile, std::string chip, std::string proc, std::string os);
    void generate_bsp_sources(std::string hpf, std::string mssfile, std::string bsp_loc);
    void regenerate_bsp_sources(std::string mssfile, std::string bsp_loc);
    void update_bsp_hpf(std::string bsp_loc, std::string hpf);

    // App Tools
    void generate_app_sources(std::string bsp_loc, std::string name, std::string app_loc);

public:
    ph1p35_tool();
    ~ph1p35_tool();
};
